package ooo.reindeer.data.util;

import ooo.reindeer.data.annotation.*;
import ooo.reindeer.data.option.Type;

import java.util.ArrayList;

@LengthField(value = "totalLength", clazz = UintVarTVL.class)
public class UintVarTVL {

    @UnsignedIntVar
    long totalLength;

    @UnsignedIntVar
    long type;

    @UnsignedIntVar
    long baseStringSize;
    @UnsignedIntVar
    long arraySize;

//    @DynamicString(lengthFieldType = Type.UnsignedIntVar)
//    String octString;


    @LengthField(value = "baseStringSize", clazz = UintVarTVL.class)
    @BaseString
    String baseString;


    @Array(value="arraySize",clazz = UintVarTVL.class)
    @OCTString(21)
    ArrayList<String> myList;

    public long getTotalLength() {
        return totalLength;
    }

    public UintVarTVL setTotalLength(long totalLength) {
        this.totalLength = totalLength;
        return this;
    }

    public long getType() {
        return type;
    }

    public UintVarTVL setType(long type) {
        this.type = type;
        return this;
    }

    public long getBaseStringSize() {
        return baseStringSize;
    }

    public UintVarTVL setBaseStringSize(long baseStringSize) {
        this.baseStringSize = baseStringSize;
        return this;
    }

    public long getArraySize() {
        return arraySize;
    }

    public UintVarTVL setArraySize(long arraySize) {
        this.arraySize = arraySize;
        return this;
    }

    public String getBaseString() {
        return baseString;
    }

    public UintVarTVL setBaseString(String baseString) {
        this.baseString = baseString;
        return this;
    }

    public ArrayList<String> getArray() {
        return myList;
    }

    public UintVarTVL setArray(ArrayList<String> myList) {
        this.myList = myList;
        return this;
    }

    @Override
    public String toString() {
        return "UintVarTVL{" +
                "totalLength=" + totalLength +
                ", type=" + type +
                ", baseStringSize=" + baseStringSize +
                ", arraySize=" + arraySize +
                ", baseString='" + baseString + '\'' +
                ", myList=" + myList +
                '}';
    }
}
